module.exports = {
	presets: ['@vue/cli-plugin-babel/preset'],
	overrides: [
		{
			include: './libs/beta-v3',
			sourceType: 'unambiguous',
		},
		{
			include: './libs/betacommon',
			sourceType: 'unambiguous',
		},
		{
			include: './libs/betafinance',
			sourceType: 'unambiguous',
		},
		{
			include: './libs/betaview',
			sourceType: 'unambiguous',
		},
	],
	plugins: [
		[
			'import',
			{
				libraryName: './libs/beta-v3', //组件库名称
				camel2DashComponentName: false, //关闭驼峰自动转链式
				camel2UnderlineComponentName: false, //关闭蛇形自动转链式
				style: (name) => {
					return `${name.replace('/lib/', '/lib/style/')}.css`
				},
			},
			'beta-v3',
		],
		[
			'import',
			{
				libraryName: './libs/betacommon', //组件库名称
				camel2DashComponentName: false, //关闭驼峰自动转链式
				camel2UnderlineComponentName: false, //关闭蛇形自动转链式
				style: (name) => {
					return `${name.replace('/lib/', '/lib/style/')}.css`
				},
			},
			'betacommon',
		],
		[
			'import',
			{
				libraryName: './libs/betaview', //组件库名称
				camel2DashComponentName: false, //关闭驼峰自动转链式
				camel2UnderlineComponentName: false, //关闭蛇形自动转链式
				style: (name) => {
					return `${name.replace('/lib/', '/lib/style/')}.css`
				},
			},
			'betaview',
		],
		[
			'import',
			{
				libraryName: './libs/betafinance', //组件库名称
				camel2DashComponentName: false, //关闭驼峰自动转链式
				camel2UnderlineComponentName: false, //关闭蛇形自动转链式
				style: (name) => {
					return `${name.replace('/lib/', '/lib/style/')}.css`
				},
			},
			'betafinance',
		],
		['@babel/plugin-proposal-optional-chaining'],
	],
}
